package jwr.ex;

class Product extends Book{
	private int id=1, //id
			price,
			printId; // 가격
	private String menu, // 상품 설명 
					con; // 생성자
	public Product(int i) {
		id=ProductInfo.stid;
		printId = i;
	}
	public int getPrice() {
		return price;
	}
	public void setPrice(int price) {
		this.price = price;
	}
	public String getMenu() {
		return menu;
	}
	public void setMenu(String menu) {
		this.menu = menu;
	}
	public String getCon() {
		return con;
	}
	public void setCon(String con) {
		this.con = con;
	}
	public int getId(){
		return id;
	}
	public int getPrintId() {
		return printId;
	}
	public void setPrintId(int printId) {
		this.printId = printId;
	}
	@Override
	public String toString() {
		String result;
		result = "상품 ID>>"+getId();
		result += "\n상품 설명>>"+getMenu();
		result += "\n생산자>>"+getCon();
		result += "\n가격>>"+getPrice();
		switch(printId){
		case 1:
			result += "\n책제목>>"+getBookTitle();
			result += "\n저자>>"+getAuthor();
			break;
		case 2:
			result += "\n앨범제목>>"+getAlbumTitle();
			result += "\n가수>>"+getSinger();
			break;
		case 3:
			result += "\n책제목>>"+getBookTitle();
			result += "\n저자>>"+getAuthor();
			result += "\n언어>>"+getLang();
			result += "\nISBN>>"+getIsbnNo();
			break;
		}
		return result;
	}
	
	
}
